<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "paper_score_info".
 *
 * @property int $id
 * @property int $sid 学生id
 * @property int $paperid 试卷id
 * @property int $classid 班级id
 * @property string $name 试卷名称
 * @property int $allscore 总成绩
 * @property int $fullmarks 试卷满分
 * @property int $radioscore 之后是各题型成绩
 * @property int $checkboxscore
 * @property int $judgescore
 * @property int $completionscore
 * @property int $bossscore
 * @property int $state 0为老师未批卷，1为批卷完成
 * @property string $create_time
 */
class PaperScoreInfo extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'paper_score_info';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['sid', 'sptableid', 'paperid', 'classid', 'name', 'fullmarks', 'radioscore', 'checkboxscore', 'judgescore'], 'required'],
            [['sid', 'sptableid', 'paperid', 'classid', 'allscore', 'fullmarks', 'radioscore', 'checkboxscore', 'judgescore', 'completionscore', 'bossscore', 'state'], 'integer'],
            [['create_time'], 'safe'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'sid' => 'Sid',
            'sptableid'=>'Sptableid',
            'paperid' => 'Paperid',
            'classid' => 'Classid',
            'name' => 'Name',
            'allscore' => 'Allscore',
            'fullmarks' => 'Fullmarks',
            'radioscore' => 'Radioscore',
            'checkboxscore' => 'Checkboxscore',
            'judgescore' => 'Judgescore',
            'completionscore' => 'Completionscore',
            'bossscore' => 'Bossscore',
            'state' => 'State',
            'create_time' => 'Create Time',
        ];
    }
}
